1. Field of the Invention
The present invention relates to an image restoring apparatus and a method thereof, and more particularly to an image restoring apparatus and a method thereof based on object removal by exemplar-based inpainting technology.
2. Description of the Related Art
In general, an image inpainting technology refers to a technology which originated from restoration of deteriorated or corrupted art works in museums in the past. Nowadays, inpainting may be used in various applications to reconstruct a corrupted part of a painting or a photograph, or to remove a portion thereof.
Image inpainting is a technology which interpolates pixels of a background image area near the boundary portion of a target image when the target image to be restored exists, and fills a target image area with the interpolated pixels. In this context, the background image stands for a remaining image except the target image to be restored in the original image.
However, the resulting image created by using such an image inpainting technology has drawbacks in that it generates a severe blur phenomenon.
A variety of technologies have been studied to supplement the image inpainting technology. One such technology is an object removal by exemplar-based inpainting technology.
The object removal by exemplar-based inpainting technology is a method to locate the most similar image to a background image adjacent to the boundary portion of a target image with reference to an edge and flat area in the original image, and fill the target image area with the searched image.
Referring to FIGS. 1A, 1B and 1C, an image restoring apparatus using the object removal by exemplar-based inpainting technology establishes the target image as shown in FIG. 1B from the original image as shown in FIG. 1A. Then, the image restoring apparatus establishes both the background image area adjacent to the boundary portion of the target image and a restoration image area including a boundary image area of the target image. The restoration image area refers to an area which includes a portion of the target image to be restored with a predetermined size.
The image restoring apparatus is adapted to search for a similar image area which has the most similar pixel value to that of the established restoration image area within the background image area. The pixel value of the restoration image area stands for the pixel value of the background image area within the restoration image area. The pixel value includes an average value of Red, Green Blue (RGB), a distribution degree of RGB, an edge value, or the like, of the pixels included in the image area.
The image restoring apparatus copies only a similar target image, which corresponds to the target image area within the restoration image area among the searched similar image areas, and attaches the same to the target image area of the restoration image area. The image restoring apparatus repeatedly performs the operations as the above until the image restoration operation is completed. When the image restoration operation is completed, the resulting image may be shown as in FIG. 1C.
As described above, the deteriorated or corrupted image is conventionally reconstructed by using the object removal by exemplar-based inpainting technology, but this technology has drawbacks in that a totally different image from the image to be restored in the target image area may be detected at the time of searching for the similar image area which has the most similar pixel value to that of the restoration image area.
Referring to FIGS. 2A and 2B, the conventional image restoring apparatus searches for the similar image area 210 in FIG. 2A, which has the most similar pixel value to that of the background image within the restoration image area 200, in the background image. However, since the similar image area 210 is located away from the restoration image area 200 in FIG. 2A, the similar image area to be searched can be a completely different image from that of the image to be restored. Therefore, there have been drawbacks in that the restored final image may have errors as indicated by numerals 220 and 230 in FIG. 2B.